﻿/*
 * Copyright © 2020, Wuxi Safover Intelligent Technology Co., Ltd. All rights reserved.
 * 
 * 无锡安永智能科技有限公司版权所有，未经许可，不得用于商业用途
 * 
 * Visit: https://www.safover.com/ 
 */

using System.Runtime.Serialization;

namespace Safover.Lidar.DataContract
{
    /// <summary>
    /// 原始通道数据及其采集配置参数类
    /// </summary>
    [DataContract]
    public class LidarRawChannel
    {
        /// <summary>
        /// 通道标识符
        /// </summary>
        [DataMember] public int ChannelId { get; set; }

        /// <summary>
        /// 采样深度/点数，目前为设置值（通过采集卡参数）
        /// </summary>
        [DataMember] public int SamplingDepth { get; set; }

        /// <summary>
        /// 空间分辨率；空间解析度（通过采集卡参数）；默认7.5
        /// </summary>
        [DataMember] public float SpatialResolution { get; set; } = 7.5f;

        /// <summary>
        /// 通道名称，人为设置值
        /// </summary>
        [DataMember] public string ChannelName { get; set; }

        /// <summary>
        /// 存储位数，默认64
        /// </summary>
        [DataMember] public int StoreBitNumber { get; set; } = 64;

        /// <summary>
        /// 累计脉冲数
        /// </summary>
        [DataMember] public int CumulativePulses { get; set; }

        /// <summary>
        /// （脉冲）工作频率，目前默认1000
        /// </summary>
        [DataMember] public int PulseFrequency { get; set; } = 1000;

        /// <summary>
        /// 通道采样数据
        /// </summary>
        [DataMember] public long[] Data { get; set; }

        public LidarRawChannel() { }

        public override string ToString()
        {
            return $"{ChannelId}-{ChannelName}: SamplingDepth={SamplingDepth}, SpatialResolution={SpatialResolution}, StoreBitNumber={StoreBitNumber}, CumulativePulses={CumulativePulses}, PulseFrequency={PulseFrequency}";
        }
    }

}
